Recall that if f:V→W is a linear function and r∈R then the scalar multiple function vrfr⋅f(v)
is also linear, and for linear functions f,g:V→W the sum vf+gf(v)+g(v)
is also linear.
Similarly, if H,G are matrices representing linear functions f,g:V→W with respect to bases B and D, then rf is represented by rH and f+g is represented by H+G
Here, r is the scalar multiple of a matrix and H+G is the sum, defined only for same-size matrices
Example 10.1
Fix domain V and codomain W with bases B=⟨β1,...,βn⟩ and D=⟨δ1,...,δn⟩.
Let h:V→W be a linear map and consider the map r⋅h:V→W given by vr⋅hr⋅h(v).
If the representation of h(v) is RepD(h(v))=⎝⎜⎜⎛w1⋮wn⎠⎟⎟⎞
Then r⋅h(v)=r⋅(w1δ1+⋯+wnδn)=(r⋅w1)δ1+⋯+(r⋅wn)δn, so RepD(r⋅h(v))=⎝⎜⎜⎛r⋅w1⋮r⋅wn⎠⎟⎟⎞=r⋅⎝⎜⎜⎛w1⋮wn⎠⎟⎟⎞
The output is r times bigger.
So if H is the matrix representing h, rH represents rh.
Similarly, if f is represented by H and g is represented by G, then f+g is represented by H+G.
For two matrices with different sizes, their domains or codomains are different, so the function sum would not be possible. Therefore, the matrix sum is not defined.
The zero matrix has all entries 0, denoted as Zn×m,Z,0n×n, or simply 0.
This is the additive identity for matrix addition.
The zero function Z:V→W is the identity for function addition.
Composition
composition of linear functions is linear
Proof
Let h:V→W and g:W→U be linear.
Then g∘h(c1⋅v1+c2⋅v2)====g(h(c1⋅v1+c2⋅v2))g(c1⋅h(v1)+c2⋅h(v2))c1⋅g(h(v1))+c2⋅g(h(v2))c1⋅g∘h(v1)+c2⋅g∘h(v2)
shows g∘h is linear
A composition of linear maps is represented by the matrix-multiplicative product of an m×r matrix G and an r×n matrix H, which yields an m×n matrix P where Pi,j=gi,1h1,j+gi,2h2,j+⋯+gi,rhr,j
So the i,j-th entry of P is the dot product of the i-th row of G and the j-th column of H GH=⎝⎜⎜⎜⎛gi,1⋮gi,2⋮⋯gi,r⎠⎟⎟⎟⎞⎝⎜⎜⎜⎜⎛⋯h1,jh2,j⋮hr,j⋯⎠⎟⎟⎟⎟⎞=⎝⎜⎜⎜⎛⋯⋮pi,j⋮⋯⎠⎟⎟⎟⎞
Example 10.2
Compute (213412)⎝⎜⎛021152113⎠⎟⎞
This will result in a 2×3 matrix (adbecf) a=2(0)+3(2)+1(1)=7b=2(1)+3(5)+1(2)=19c=2(1)+3(1)+1(3)=8d=1(0)+4(2)+2(1)=10e=1(1)+4(5)+2(2)=25f=1(1)+4(1)+2(3)=11
Proof
Let h:V→W and g:W→X be represented by matrices H and G with respect to bases B⊂V, C⊂W, D⊂X of sizes n,r,m.
For any v∈V, the k-th component (1≤k≤r) of RepC(h(v)) is hk,1v1+⋯+hk,nvn,
so the i-th component of RepD(g∘h(v)) is gi,1(h1,1v1+⋯+h1,nvn)+⋯+gi,r(hr,1v1+⋯+hr,nvn)
Distributing and grouping by the v's (gi,1h1,1+gi,2h2,1+⋯+gi,rhr,n)v1+⋯+(gi,1h1,n+gi,2h2,n+⋯+gi,rhr,n)vn
Each coefficient of v's matches the definition for the i,j-th entry of the product GH
This image shows the relationship between maps and matrices
It simply shows there are two ways to get from v∈V to g(h(v))
Example 10.3
Let V=R2, W=P2, X=M2×2 with bases B=⟨(11),(1−1)⟩C=⟨x2,x2+x,x2+x+1⟩ D=⟨(1000),(0020),(0300),(0004)⟩
Suppose h:R2→P2 and g:P2→M2×2 have these actions (ab)hax2+(a+b)px2+qx+rg(p0p+qr)
and the matrices G and H represent g and h.
We will check that the matrix product GH represents g∘h
The composition has the action (ab)g∘h(a0aa+b)
Now, we find the matrix H (11)=RepB((10))hx2+2=RepC(⎝⎜⎛1−22⎠⎟⎞) (1−1)=RepB((01))hx2=RepC(⎝⎜⎛100⎠⎟⎞)
So H=⎝⎜⎛1−22100⎠⎟⎞
Next, to find G x2=RepC(⎝⎜⎛100⎠⎟⎞)g(1010)=RepD(⎝⎜⎜⎜⎛11/200⎠⎟⎟⎟⎞) x2+x=RepC(⎝⎜⎛110⎠⎟⎞)g(1020)=RepD(⎝⎜⎜⎜⎛1100⎠⎟⎟⎟⎞) x2+x+1=RepC(⎝⎜⎛111⎠⎟⎞)g(1021)=RepD(⎝⎜⎜⎜⎛1101/4⎠⎟⎟⎟⎞)
So G=⎝⎜⎜⎜⎛11/20011001101/4⎠⎟⎟⎟⎞
Now, we compute GH GH=⎝⎜⎜⎜⎛11/20011001101/4⎠⎟⎟⎟⎞⎝⎜⎛1−22100⎠⎟⎞=⎝⎜⎜⎜⎛1(1)+1(−2)+1(2)1/2(1)+1(−2)+1(2)01/4(2)11/200⎠⎟⎟⎟⎞=⎝⎜⎜⎜⎛11/201/211/200⎠⎟⎟⎟⎞
We check this by finding the matrix representation of g∘h (11)=RepB((10))g∘h(1012)=RepD(⎝⎜⎜⎜⎛11/201/2⎠⎟⎟⎟⎞) (1−1)=RepB((01))g∘h(1010)=RepD(⎝⎜⎜⎜⎛11/200⎠⎟⎟⎟⎞)
This yields the matrix GH=⎝⎜⎜⎜⎛11/201/211/200⎠⎟⎟⎟⎞
which is equal to what was computed before.
Note that the order of matrices is the same as function composition
i.e., g∘h applies h, then g, and the matrix product GH multiplies the input by H, then G.
Matrix multiplication is not commutative.
Example 10.4
Are thse two matrix products equal? (1324)(2041)(2041)(1324)
The first yields (1324)(2041)=(1(2)+2(0)3(2)+4(0)1(4)+2(1)3(4)+4(1))=(26616)
The second yields (2041)(1324)=(2(1)+4(3)0(1)+1(3)2(2)+4(4)0(2)+1(4))=(143204)
Clearly, they are not equal. (26616)=(143204)
However, there are some nice properties
Given matrices F,G,H where the matrix products are defined:
multiplication is associative (FG)H=F(GH)
Proof
Matrix multiplication represents function composition, so (FG)H is (f∘g)∘h and F(GH) is f∘(g∘h), both of which are equivalent to f∘g∘h
multiplication distributes over matrix addition F(G+H)=FG+FH(G+H)F=GF+HF
Proof
Proofs for both sides are similar, so we only prove F(G+H)=FG+FH
Converting to function composition, we must prove that f∘(g+h)(v)=f∘g(v)+f∘h(v) f∘(g+h)(v)=f(g(v)+h(v))=f(g(v))+f(h(v))=f∘g(v)+f∘h(v)
Mechanics
Columns of GH are formed by taking G times columns of H
Rows of GH are formed by taking rows of G times H
Proof is just computation
An i,junit matrix (or matrix unit) is a matrix where everything is 0 except element i,j is 1
The main diagonal (or principal diagonal or diagonal) of a square matrix is the upper left to lower right diagonal
An identity matrix is a square matrix with all 0s except the main diagonal is 1
multiplying on the left or the right keeps the matrix the same
A diagonal matrix is a matrix with 0s outside the main diagonal
multiplying on the left rescales the rows, on the right rescales the columns
A permutation matrix has all 0s except for a single 1 in every row and column
multiplying on left swaps rows, on right swaps columns
The elementary reduction matrices (or elementary matrices) are formed by applying a single Gaussian operation on an identity matrix
can perform Gaussian reduction
Example 10.5
We can apply the operation (1/2)ρ2 on the matrix ⎝⎜⎛100220350⎠⎟⎞
or we can apply the operator to the identity matrix and multiply with the matrix ⎝⎜⎛10001/20001⎠⎟⎞⎝⎜⎛100220350⎠⎟⎞
The same can be done with the other operations
Example 10.6
Gaussian reduction can be performed with row operators (1324)−3ρ1+ρ2(102−2)ρ2+ρ1(100−2)−1/2ρ2(1001)
Or the elementary matrices can be multiplied instead (100−1/2)(1011)(1−301)(1324)=(1001)
Each of the matrices (from the right) are the elementary matrices for each row operator step
Inverses
Recall: right inverse, left inverse, two-sided inverse (is unique)
Matrix G is a left inverse matrix of matrix H if GH is the identity matrix
Matrix G is a right inverse matrix of matrix H if HG is the identity matrix
A matrix H with a two-sided inverse is an invertible matrix, with the inverse denoted H−1
If a matrix has both a left and right matrix, they are equal.
A matrix is invertible iff it is nonsingular.
Proof is simple: Fix dimensions and bases, then a matrix represents a map, and these are true of maps so they are true of matrices.
If G and H are invertible matrices, GH (if defined) is invertible with (GH)−1=H−1G−1
A matrix H is invertible iff it can be written as the product of elementary reduction matrices.
Proof
H is invertible iff it is nonsingular, so it Gaus-Jordan reduces to the identity through a series of operations Rr⋅Rr−1⋯R1⋅H=I
Each row operation is invertible, and the inverses are elementary.
Apply Rr−1, then Rr−1−1 etc to both sides to get H=Rr−1⋅Rr−1−1⋯R1−1⋅I
This represents H as the product of elementary operations.
The inverse can be computed by multiplying the same reduction matrices in the same order to the identity matrix.
Proof
Group as (Rr⋅Rr−1⋯R1)⋅H=I
Then we have H−1=Rr⋅Rr−1⋯R1⋅I
Thus, to find the inverse, we write the identity matrix next to the matrix we want to find the inverse of, and row reduce the matrix.
Example 10.7
Find the inverse of A=⎝⎜⎛1213021−10⎠⎟⎞
−ρ3↔1/3ρ2⎝⎜⎛1213021−10100010001⎠⎟⎞⎝⎜⎛100010−211−214/3001/33−1−2⎠⎟⎞−2ρ1+ρ2−ρ1+ρ2−ρ3+ρ22ρ3+ρ1⎝⎜⎛1003−6−11−3−11−2−1010001⎠⎟⎞⎝⎜⎛1000100012/3−1/34/32/3−1/31/3−11−2⎠⎟⎞−6ρ3+ρ23ρ3+ρ1⎝⎜⎛10000−1−23−1−24−10103−61⎠⎟⎞
Thus the inverse is A−1=⎝⎜⎛2/3−1/34/32/3−1/31/3−11−2⎠⎟⎞
The inverse of a 2×2 matrix exists iff ad−bc=0 and is (acbd)−1=ad−bc1(d−c−ba)
The proof is a matter of trying it yourself.
The inverse of representation matrix is (RepB,D(h))−1=RepD,B(h−1)